package com.example.demo.event.rabbitMq;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author lyc
 * @date 2019/6/10.
 */
@Component
@Slf4j
public class Receiver {

   @RabbitListener(queues = "Stock.out")
    public void process(String msg) {
       try {
           Thread.sleep(1000);
       } catch (InterruptedException e) {

       }
       log.info("rabbitMq : " + msg);
    }
}